package cn.com.dcsgo.common;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;
import java.util.List;

/**
 * 分页数据的模型
 *
 * @author Dcsgo
 * @since 20/5/2025 上午 10:33
 */
@Slf4j
@Data
@Schema(description = "分页信息")
public class PageInfo<T, Q> implements Serializable {
    /**
     * 当前页数
     */
    @Schema(description = "页码")
    private Integer pageNumber = 1;
    /**
     * 每页显示条数
     */
    @Schema(description = "每页记录数")
    private Integer pageSize = 10;
    /**
     * 总条数
     */
    @Schema(description = "总记录数")
    private Long totalCount;
    /**
     * 总页数
     */
    @Schema(description = "总页数")
    private Integer totalPage;
    /**
     * 数据
     */
    @Schema(description = "数据")
    private List<T> list;
    /**
     * 查询条件
     */
    @Schema(description = "查询条件")
    private Q params;
}
